Zooplankton Simulation Figure Testing

Results from Marine Heatwave Simulations 2023

Published

June 15, 2023

Notes 3/30/2023

Use just the data for the dominant species, not all taxa, for the dominant species plot. there will be one figure showing autumn heatwave response in the paper, the rest of the seasons will need to exist but will go in supplement.

Try the horizons to see if that is insightful at all, but don’t spend all day on it. Maria suggested the absolute biomass difference as a unit, not percent change.

About

This markdown will step through the different results from Maria’s work on heatwaves on plankton communities. Each result section will have its own header and options:

Loading the Data

Species Key Table

species : type of groups (protists, active copepod, passive copepod)

pft_numb : functional group number 1: protist, 2: active copepod, 3: passive copepod

min_size : minimum cell/body size (um)

max_size : maximum cell/body size (um)

temp_opt : temperature norm optima (Celcius)

control : control number for each group (1-112: protist, 1-64: active copepod, 1-24: passive copepod).

The control number is being used for the dominant groups plots (in the “ind_bio_X_XXXX”.csv more details in the dominant_species_FOLDER)

species pft_numb min_size max_size temp_opt control
protist 1 1.00e-07 3.00e-07 0 1
protist 1 3.00e-07 7.00e-07 0 2
protist 1 7.00e-07 1.90e-06 0 3
protist 1 1.90e-06 5.20e-06 0 4
protist 1 5.20e-06 1.39e-05 0 5
protist 1 1.39e-05 3.73e-05 0 6

Dominant Species

The folder includes the absolute, relative biomass and control number of plankton functional groups for different heatwave scenarios. The second row is the heatwave seasonal value. From row 3 and afterwards we have the seasonal values after the heatwave.

*For copepods: ONLY THE ADULT STAGE

This folder contains sets of matrices that come in threes:

Reshaping:

Ind_bio = This matrix details which taxa correspond to the absolute/relative biomass in the other matrices. This is the identification key used to match to species dataframe.

abs_bio = the absolute biomass

rel_bio = relative biomass

trial species matrix_row matrix_col control relative_bio absolute_bio seasons pft_numb min_size max_size temp_opt
bio_CaA_autumn act_cop 1 col_1 46 23.727548 4.155886 Au_control 2 0.8773067 87.73067 20
bio_CaA_autumn act_cop 1 col_2 54 22.017397 3.856352 Au_control 2 0.8773067 87.73067 24
bio_CaA_autumn act_cop 1 col_3 47 19.600459 3.433025 Au_control 2 2.9619363 296.19363 20
bio_CaA_autumn act_cop 1 col_4 55 17.348404 3.038577 Au_control 2 2.9619363 296.19363 24
bio_CaA_autumn act_cop 1 col_5 45 9.645399 1.670431 Au_control 2 0.2598526 25.98526 20
bio_CaA_autumn act_cop 2 col_1 54 37.236535 6.489351 A 2 0.8773067 87.73067 24

Dominant Species - Data Wrangle:

Couple data wrangling steps here: - make row and column identifiers for what the season was, and what the year was that matches the heatwave trial - add one year of control as a lead-in for plots - join the control biomass as a column so we can caluclate difference and percent difference from what it would be without a heatwave disturbance - do some benchmarking against the taxa specific intra-annual fluctuation in biomass

Dominant Species - Seasonal Cycle Control

NOTES: Do a similar cleanup to the heatwave results, with some minor tweaks want all the columns to match so they can append. year = 0, hw_season is either none, or we can repeat it 4 times to filter with the data or we can just plop it on top whenever we want it later.

Control conditions precede the heatwave event. Need to assemble these into one consecutive year (year = 0), ordered by season, and then bind them ahead of the heatwave response data.


Dominant Species Figures

Objective:

We want to focus on the Autumn heatwaves to showcase them, the other seasons can go in the supplement. We want to follow how different body sizes respond, while acknowledging that the community is stable as a whole

Copepods have optima of 20 & 24, these are the main optima to focus on Protists have a wider range

Scatterplots can reflect the response differences better than stacked bars, but get complicated quickly with lots of species.

Dominant Species Data Wrangling:

1. Isolate the HW Season Responses:

# A tibble: 4 × 1
  seasons
  <fct>  
1 Summer 
2 Autumn 
3 Winter 
4 Spring 

2. Lead with 1-Year of Control:

3. Calculate Difference from Control:

Status Pass: Dimensions for seasonal_response are Good Status: All four heatwave season exposures prepped in a list for plotting

This figure hits all the information I think Maria wants, but is washed out because the biomass differences are on different scales for each functional group.

Change in Absolute Biomass

The following figures display how far from the control cycle each of the dominant species sits

Percent Change in Biomass

The following figures display that same difference in biomass from the control state, but displayed as a percentage difference from that control cycle’s biomass

Autumn Heatwave - Independent Functional Groups

For main figure only put Autumn. Use multiple subplots for the functional groups and then within them the temperature optima. Size range and biomass changes need to re-scale between these different groups, so they will need to be plotted independently.

AHW - Logistic Color Scales

If we want to show biomass on the y, we can use a logistic color scale for the body size. This would likely need different figures for the different functional groups since they cover different ranges.

AHW Horizons

Just so many taxa to show, but the idea is to use horizons to show how many seasons taxa are above/below their control state in some common unit (percent difference). The following figure is just the protists.

For added control or clarity I could try nesting the facet labels with this package: https://stackoverflow.com/questions/62652308/combine-multiple-facet-strips-across-columns-in-ggplot2-facet-wrap

AHW Stacked Bars:

Stacked bars are probably the most obvious and least exciting plot form for this. They can show the contribution of various groups (temperature optima, functional group, body size) to the total aggregate or what fractions they are of the whole.

If we lead in with a year of the control state then its possible to try* and compare back and forth, but it is very hard to tell:

If we use fraction of the total community its a little easier to see where the relative biomass is, but again we need to pick either temperature or body size, can’t really do both, and we lose the comparison across functional groups.

AHW Change from Control Bars

These take the stacked bar idea, but subtract out the control state. Each taxa is done independently so we can see that theere are cases where similar taxa in temperature optima may do better/worse, and what that looks like accross the whole group:

This panel tracks each season longitudinally on its own, rather than as parts within a year.


Size Bin Figures

The folder includes the differences of seasonal biomass (absolute number) of the size bins for protists (6), active copepods (6) and passive copepods communities (4).

*for copepods: ALL LIFE STAGES (juvenile + adult)

First row : the seasonal biomass difference during the heatwave

Rows 2- 36 : the biomass difference after the heatwave for 9 years

-- column headers seasons X_hw : the season when the HW occurs. All files start with the HW A : autumn S : spring Su : summer W : winter

Notes:

For the size bins. We can drop sb1 for protists, sb1+2 for actives, & sb 1 for passives. Protists will need their own color scale here.

Size Bin Anomalies Following Heatwaves

  • Don’t need to show the control conditions
  • Start with heatwave directly
  • Don’t need to change, just do refining
  • Remove the smallest groups for protists and passive copepods (the first smallest group)
  • Remove the two smallest groups in the active copepods (the first 2 smallest groups)

File endings: NA = heatwave on both - Used in paper _cop_only = copepods only impacted with heatwave - supplement _prot_only = protists only impacted - supplement

Data Wrangling

file_id row heatwave_condition seasons P_control Ca_control CaA_control Cp_control CaP_control
seasonal_control 1 Heatwave Occurs W 2 1.0551861929333 0.884576612903226 1.3252688172043 1.2244623655914
seasonal_control 2 Heatwave Recovery S 1 0.49609375 0.4375 0.660450268817204 0.625
seasonal_control 3 Heatwave Recovery Su 1 0.488642153532609 0.437669836956522 0.664628623188406 0.625
seasonal_control 4 Heatwave Recovery A 1 0.509057348901099 0.440418956043956 0.631524725274725 0.614468864468865
file_id row heatwave_condition size_bin_1 size_bin_2 size_bin_3 size_bin_4 size_bin_5 size_bin_6
cc_A_mean_autumn_cop_only 1 Heatwave Occurs 6.72e-05 0.0000443 -0.2071580 -1.5628502 -6.1784698 -0.2726971
cc_A_mean_autumn_cop_only 2 Heatwave Recovery 5.40e-06 0.0006766 -0.0855209 -2.2300260 -3.6343000 -0.3065866
cc_A_mean_autumn_cop_only 3 Heatwave Recovery 3.40e-06 -0.0000118 -0.0196872 -0.3950534 -3.6141015 -0.7991909
cc_A_mean_autumn_cop_only 4 Heatwave Recovery 2.40e-06 -0.0000166 -0.4370677 -1.1901704 -5.8301654 -0.3024307
cc_A_mean_autumn_cop_only 5 Heatwave Recovery -1.05e-05 0.0005679 -0.3994118 -5.6818918 -0.2378401 2.9368526
cc_A_mean_autumn_cop_only 6 Heatwave Recovery 4.60e-06 0.0035631 0.0200558 -1.4053838 -2.3759260 -0.6176969
file_id row heatwave_condition size_bin_1 size_bin_2 size_bin_3 size_bin_4 size_bin_5 size_bin_6
seasonal_spring_HW_diff 1 Heatwave Occurs S_hw 0 -8.58516483516203e-05 -0.0042925824175824 -0.0289606227106227 -0.0306776556776557
seasonal_spring_HW_diff 2 Heatwave Recovery Su 0 0.0170014779250955 0.0565455850191362 0.00397245762711873 0.025537634408602
seasonal_spring_HW_diff 3 Heatwave Recovery A 0 0.0231854838709677 0.046875 -0.00520833333333326 0
seasonal_spring_HW_diff 4 Heatwave Recovery W 0 0.00895889945652173 0.0446671195652174 5.66123188405765e-05 0
seasonal_spring_HW_diff 5 Heatwave Recovery Sp 0 0.00907881181318682 0.0255837912087912 0.00171703296703296 0.0105311355311355
seasonal_spring_HW_diff 6 Heatwave Recovery S 0 0.00645737937397506 0.0337701612903226 0.001008064516129 0.00134408602150526

Taxa-Specific Body Size Bins

The different taxa have different body size ranges associated with each bin, these need to be matched up for labels:

Size-Bins Absolute Biomass

These all start with the season the heatwave hits, then the row number counts in integers for the seasons. Split the data by the heatwave season then based on that, proceed with the correct seasons that follow to construct labels.


Shannon Diversity Index Figures

The folder includes the shannon diversity indexes for protists, active copepods and passive copepods communities.

For copepods: ONLY THE ADULT STAGE

Each csv file has the shannon values for one specific season for 9 years. Year 0 : pre-heatwave year Year 1 : heatwave year Years 2-9 : years after the heatwave

NOTES:

For the diversity plots there needs to be a choice between displaying change as AWSpS or each season as y1 y2 y3 y4 …

year file_id season_taxa shannon_idx hw_status hw_season season taxa
0 autumn_Ca_all_seasons autumn_Ca_spring 3.280343 Pre-Heatwave Autumn HW Spring Active Copepods
0 autumn_Ca_all_seasons autumn_Ca_summer 4.136993 Pre-Heatwave Autumn HW Summer Active Copepods
0 autumn_Ca_all_seasons autumn_Ca_autumn 4.795545 Pre-Heatwave Autumn HW Autumn Active Copepods
0 autumn_Ca_all_seasons autumn_Ca_winter 4.229620 Pre-Heatwave Autumn HW Winter Active Copepods
1 autumn_Ca_all_seasons autumn_Ca_spring 4.128155 Heatwave Autumn HW Spring Active Copepods
1 autumn_Ca_all_seasons autumn_Ca_summer 4.234364 Heatwave Autumn HW Summer Active Copepods

Richness Figures

Need two things: - Time - Shannon diversity (within a functional group)

The diversity index is on the annual scale, not the seasonal scale <-

Can start with the annual, and see what that looks like first

Annual Change within a Season

Intra-Annual Variations

Same data, but now the x axis flows Spring - > Summer -> Autumn -> Winter -> Spring… as it would throughout the years